package com.example.apiversioncontroldemo.web.v202310;

import com.example.apiversioncontroldemo.util.vcon.ApiVersion;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chen.cr
 * @since 2023/10/18
 */
@RestController
@RequestMapping("/{version}/hello")
@ApiVersion(version = 202310, description = "202310版本")
public class HelloV202310Controller {

    @GetMapping("/test1")
    public String test1(String name) {
        return "Name is: " +  name + ".  (This is 'v202310' api interface.)";
    }


    @GetMapping("/test2")
    public String test2(int age) {
        return "Age is: " +  age + ".  (This is 'vv202310' api interface.)";
    }

}
